﻿using Adp.Common;
using Microsoft.AspNetCore.Mvc;
using Yqd;
using Yqd.Core;

namespace Ybh.Controllers
{
    [Area("Yqd")]
    public class WxUploadController : Controller
    {
        public IActionResult FileUpload()
        {
            var pos = Form.GetString("pos", "");
            var suffix = Form.GetInt("suffix", 0);
            return new FileUploadResult(Config.Yqdpath("/"), pos, suffix);
        }


        public IActionResult FileDownload()
        {
            var path = Config.Yqdpath("/");
            var filepath = Form.GetString("fn", "");
            if (filepath != "") path += filepath;
            return new FileDownloadResult(path);
        }

        
    }
}